#include "junix.h"

int main(int argc, char **argv)
{
	int fds[2];
	char buf[BUFSIZ];
	ssize_t sz;

	socketpair(AF_UNIX, SOCK_STREAM, 0, fds);

	pid_t pid=Fork();
	if(!pid)
	{
		sz=Read(fds[0], buf, BUFSIZ);
		Write(STDOUT_FILENO, buf,sz);
		Write(fds[0],"world\n\n",5);

	}else{

		Write(fds[1],"hello",5);
		Read(fds[1],buf,BUFSIZ);
		Write(STDOUT_FILENO, buf,sz);

	}

    exit(0);
}

